<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for循环</title>
</head>
<body>
<script>
    for (j = 1;j <= 5;j++){//行数
        for (i = 1;i <= j;i++){//每一行的个数依次递增
            document.write("*");
        }
        document.write("<br>");
    }
</script>
</body>
</html>